package com.devhelper.examples.gef.listener;

import org.eclipse.draw2d.IFigure;
import org.eclipse.draw2d.MouseEvent;
import org.eclipse.draw2d.MouseListener;
import org.eclipse.draw2d.MouseMotionListener;
import org.eclipse.draw2d.geometry.Point;

public class FigureMover implements MouseListener, MouseMotionListener {
    private final IFigure figure;
    private Point location;

    public FigureMover(IFigure figure) {
        this.figure = figure;

        figure.addMouseListener(this);
        figure.addMouseMotionListener(this);
    }

    @Override
    public void mouseDragged(MouseEvent me) {
    }

    @Override
    public void mouseEntered(MouseEvent me) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseExited(MouseEvent me) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseHover(MouseEvent me) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseMoved(MouseEvent me) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mousePressed(MouseEvent me) {
        location = me.getLocation();
        me.consume();
    }

    @Override
    public void mouseReleased(MouseEvent me) {
        // TODO Auto-generated method stub

    }

    @Override
    public void mouseDoubleClicked(MouseEvent me) {
        // TODO Auto-generated method stub

    }

}
